home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / SoundAndMusic / cmix / lib / evp.c < prev    next >
C/C++ Source or Header  |  1989-02-25  |  315b  |  18 lines

  1. float evp(nsample,f1,f2,q)
  2. long nsample;
  3. float *f1,*f2,*q;
  4. {
  5.     register jloc;
  6.     float far = (float)(nsample)/ *q;
  7.     if( far > *(q+1)) {
  8.         jloc = (1. - ((far - *(q+1))/ *(q+4))) * *(q+3);
  9.         return(*(f2+jloc));
  10.         }
  11.     else
  12.         if(far >= *(q+2)) return(1.);
  13.     else    {
  14.         jloc = far * *(q+3)/ *(q+2);
  15.         return(*(f1+jloc));
  16.         }
  17. }
  18.